<template>
	<view>
		<view class="heiader">
			<view class="bei"></view>
			<view class="toux acea-row row-center-wrapper">
				<view>
					<view class="images">
						<image :src="list.avatar" mode=""></image>
					</view>
					<view class="text-center">{{list.user_nickname}}</view>
				</view>
			</view>
		</view>
		<navigator url="../wod-sc/wod-sc">
			<view class="shouList acea-row  row-between-wrapper">
				<view class="acea-row">
					<image src="../../static/7.png" mode=""></image>
					<view>我的收藏</view>
				</view>
				<image src="../../static/y.png"></image>
			</view>
		</navigator>
		<navigator url="../wod-yy/wod-yy">
			<view class="shouList acea-row  row-between-wrapper">
				<view class="acea-row">
					<image src="../../static/8.png" mode=""></image>
					<view>我的预约</view>
				</view>
				<image src="../../static/y.png"></image>
			</view>
		</navigator>
		<navigator url="../wod-tw/wod-tw">
			<view class="shouList acea-row  row-between-wrapper">
				<view class="acea-row">
					<image src="../../static/9.png" mode=""></image>
					<view>我的提问</view>
				</view>
				<image src="../../static/y.png"></image>
			</view>
		</navigator>
		<navigator url="../wod-wti/wod-wti">
			<view class="shouList acea-row  row-between-wrapper">
				<view class="acea-row">
					<image src="../../static/10.png" mode=""></image>
					<view>问题反馈</view>
				</view>
				<image src="../../static/y.png"></image>
			</view>
		</navigator>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[]
			}
		},
		onLoad() {
			var jweixin = require('jweixin-module')
			var that = this
			console.log(jweixin)
				var urls = window.location.href
			this.$api('/portal/index/jsconfig', {datas:{url:urls}}, function(res) {
				console.log(res)
				var s = res.data.data
				jweixin.config({
				    debug: false,
				    appId: s.appId,
				    timestamp: s.timestamp,
				    nonceStr: s.nonceStr,
				    signature:s.signature,
				    jsApiList: ["updateTimelineShareData","updateAppMessageShareData"]
				});
				jweixin.ready(function(){
				jweixin.updateTimelineShareData({
						title: '海绵医学院', // 分享标题
					    link: urls, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
					    imgUrl: 'http://api.haimiantv.cn/upload/default/20200426/86ea4921376b6656f24fbb40e674b361.png', // 分享图标
					    success: function () {
					      // 设置成功
						  console.log(1)

					    }
				})
				jweixin.updateAppMessageShareData({
					title: '海绵医学院', // 分享标题
					desc: '一个专业/有态度的医学直播交流平台', // 分享描述
					link: urls, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
					imgUrl: 'http://api.haimiantv.cn/upload/default/20200426/86ea4921376b6656f24fbb40e674b361.png', // 分享图标
					success: function () {
					  // 设置成功
					}
				  })



				})
				jweixin.error(function(res){
					console.log(res)
				})
			})
		},
		onShow(){
			var that = this
			var id = uni.getStorageSync('ids')
			if(id == undefined || id == ""){
				uni.reLaunch({
					url:'../kongs/kongs'
				})
				return false
			}
			console.log(id)
			this.$api('/portal/index/my',{datas:{user_id:id}},function(res){
				console.log(res)
				that.list = res.data.data
			})
		},
		methods: {

		}
	}
</script>

<style>
	@import url("./wod.css");
</style>
